Non-volatile memories, such as flash EPROM (erasable programmable read-only memory) devices have developed into a popular source of memory in a wide range of digital applications. Flash memory devices typically allow for high memory densities, high reliability, and low power consumption. These characteristics have made flash memory very popular for low power applications, such as embedded memory circuits. Common uses of non-volatile memory include portable computers, personal digital assistant (PDA) devices, digital cameras, cellular telephones, TV boxes, routers, copy machines, and any number of other consumer products. In these devices, both program code and system data, such as configuration parameters and other code, are often stored in flash memory, because of the compact storage and relative ease of software upgradeability.
Non-volatile memories, such as flash memories are also often used in these systems to store modular and upgradeable information, such as basic input/output system (BIOS) code, so pieces of the platform may be updated without having to frequently replace components in the system. The two common types of flash memory include NOR and NAND flash memory, which refers to the types of transistors and memory array physical organization used in the device. Both types of flash memory store information in an array of transistors, which are referred to as cells. Traditionally, each cell stores 1-bit of information per cell; however, multi-bit cells are also currently used to store multiple bits per cell of a flash device.
Typically, flash devices are organized into blocks or clusters of a plurality of cells to store data. Flash memory is usually erased on a block-level. However, in some instances flash is potentially written to in smaller sizes of data, as compared to blocks, which are generally referred to as fragments. Files are typically broken into fragments and stored in different blocks, where each fragments is a logical piece of the file. The fragments are organized and accessible through a table, and are generally linked together by a table either stored in flash or in RAM. Once the data in a fragment is updated, the updated data is written to a new location in Flash and the old location is marked invalid.
When the file system is full, i.e. the file system contains both valid and invalid fragments, or when no action is being taken, reclaim or garbage collection is performed. Here, all the valid data from a block is copied into another block, such as a spare block, while the current block is deleted. Sometimes, data is kept in the file system at a block-level, which potentially creates difficulties similar to those discussed below.
As files are often broken up by fragments and stored linked though out a flash device, memory within the device is potentially inefficiently used. When data does not fill up a block of memory, the rest of the block is usually not utilized, as a fragment of data by the construct of current file systems is required to be aligned with blocks of data.
Some flash devices include file system architectures to handle (1) a read and write style architecture and (2) a read only style architecture. Most file systems fall into the first category and are setup for read/write capability. Read and write architectures potentially incur overhead when performing reads to ensure write capability to the same memory locations. For example, garbage collection, as discussed above, sets aside some amount of memory to perform memory management, which is potentially not required in a read only portion of memory. Alternatively, current read only file system architectures, which may include a read/write file system modified to be read-only, are sometimes utilized to protect data from external parties. When a read/write architecture is modified to include a read only portion, the read access limitations potentially still exist as the file system architecture is setup to also handle writes. Moreover, some current file system align data to fragments, which may be any size, such as 1024 bytes, to optimize tables used to track the location of data. Attempts to align data with different sizes to a fragment often leads to inefficient storage and access time. Furthermore, these file system architectures usually support compression at a file granularity. As a result, in certain cases a full file remains uncompressed if it is frequently accessed, even though, only a small portion of the file is being accessed. Alternatively, a whole file is sometimes uncompressed upon an access to only a portion of the file, instead of uncompressing only the portion being accessed.